Teaching device, teaching method, and robot system

ABSTRACT

A teaching device constructs, in a virtual space, a virtual robot system in which a virtual 3D model of a robot and a virtual 3D model of a peripheral structure of the robot are arranged, and teaches a moving path of the robot. The teaching device includes an acquisition unit configured to acquire information about a geometric error between the virtual 3D models, and a correction unit configured to correct the moving path of the robot in accordance with the information acquired by the acquisition unit.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of U.S. patent application Ser. No.15/548,078, filed Aug. 1, 2017, which is a National Stage Entry ofInternational Application No. PCT/JP2016/000415, filed Jan. 27, 2016,which claims the benefit of Japanese Patent Application No. 2015-019641,filed Feb. 3, 2015, all of which are hereby incorporated by referenceherein in their entirety.

TECHNICAL FIELD

The present invention relates to a teaching device which teachesoperations of a robot off-line, a teaching method, and a robot system.

BACKGROUND ART

A teaching device constructs a virtual robot system constituted by arobot and a peripheral structure of the robot in a virtual space,generates an operation program of the robot and teaches the operation ofthe robot off-line. An error usually exists between a virtual robotsystem and a real robot system and, if an operation program of a robotgenerated by a teaching device is supplied to a real robot system, it ispossible that an interference or the like occurs between the robot andthe peripheral structure.

PTL 1 discloses a technique as a teaching device in consideration of theerror described above. This technique is for avoiding an interferencebetween a robot and a peripheral structure by detecting an error indisposed position between a structure of a real robot system and avirtual robot system by measuring the disposed position of the structureof the real robot system using a 2D visual sensor, a 3D visual sensor, adistance sensor, and the like, and shifting teaching point coordinatesby the amount of the error.

CITATION LIST Patent Literature

[PTL 1]

Japanese Patent Laid-Open No. 2003-150219

SUMMARY OF INVENTION Technical Problem

In a teaching device, 3D models of a robot or a peripheral structure areprepared and disposed in a virtual space to construct a virtual robotsystem. A teaching work is conducted by setting operations of the robotand teaching point coordinates using these 3D models. Duringconstruction of the virtual robot system, the 3D model prepared by amanufacturer of the robot may be used for the robot, whereas no 3D modelis prepared for the peripheral structure in many cases. In this case,the 3D model of the peripheral structure is substituted by a simplegeometric model having a substantially the same outer dimension.Therefore a difference may occur in model geometry of a structurebetween the virtual robot system and the real robot system.

The technique disclosed in PTL 1 merely corrects errors in disposedpositions of the virtual robot system and the real robot system, and isnot able to correct an error in model geometry of the structure.Therefore, in the technique disclosed in PTL 1, it is possible thatinterference between the robot and the structure occurs in the realrobot system due to a difference in a model geometry. The shortest pathto a working point may be changed if a difference exists in a modelgeometry. In the shifting of the teaching point coordinates by theamount of the errors regarding the disposed positions as in thetechnique disclosed in PTL 1, a moving path of the robot cannot becorrected to the shortest path.

Solution to Problem

Then, the present invention generates appropriate off-line teaching dataeven if a geometric difference occurs between a structure of a virtualrobot system and a structure of a real robot system.

According to an aspect of the present invention, a teaching device whichconstructs, in a virtual space, a virtual robot system in which avirtual 3D model of a robot and a virtual 3D model of a peripheralstructure of the robot are arranged, and teaches a moving path of therobot, the device includes: an acquisition unit configured to acquireinformation about a geometric error between the virtual 3D models; and acorrection unit configured to correct the moving path of the robot inaccordance with the information acquired by the acquisition unit.According to the present invention, appropriate off-line teaching datacan be generated even if a geometric difference occurs between astructure of a virtual robot system and a structure of a real robotsystem.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a configuration diagram illustrating an exemplary robot systemof the present embodiment.

FIG. 2 is a diagram illustrating an exemplary hardware configuration ofa teaching device.

FIG. 3 is a flowchart illustrating an exemplary procedure of a previousanalysis process.

FIG. 4 is a diagram illustrating details of a system construction unit.

FIG. 5 is a diagram illustrating details of screen configuration elementdata.

FIG. 6 is a diagram illustrating exemplary teaching points and anexemplary moving path.

FIG. 7 is a flowchart illustrating an exemplary procedure of a pathcorrection process.

FIG. 8 is a diagram illustrating a method for measuring a component.

FIG. 9A is a diagram illustrating an exemplary geometric differencepattern of a 3D model.

FIG. 9B is a diagram illustrating an exemplary geometric differencepattern of a 3D model.

FIG. 9C is a diagram illustrating an exemplary geometric differencepattern of a 3D model.

FIG. 9D is a diagram illustrating an exemplary geometric differencepattern of a 3D model.

FIG. 10A is a diagram illustrating a method for comparing models.

FIG. 10B is a diagram illustrating a method for comparing models.

FIG. 11 is a diagram illustrating a path correction determination method(shortest path correction).

FIG. 12 is a diagram illustrating exemplary shortest path correctiondetermination.

FIG. 13 is a diagram illustrating exemplary shortest path correctiondetermination.

FIG. 14 is a diagram illustrating exemplary shortest path correctiondetermination.

FIG. 15 is a diagram illustrating an exemplary shape of an end effector.

FIG. 16 is a diagram illustrating an example in which shortest pathcorrection is to be conducted.

FIG. 17 is a diagram illustrating an example in which shortest pathcorrection is to be conducted.

FIG. 18 is a diagram illustrating a path correction determination method(interference avoidance path correction).

FIG. 19 is a diagram illustrating an example in which interferenceavoidance path correction is to be conducted.

FIG. 20 is a diagram illustrating a shortest path correction method.

FIG. 21 is a diagram illustrating a method for setting a start point andan end point of shortest path correction.

FIG. 22 is a diagram illustrating a path searching method.

FIG. 23 is a diagram illustrating a path searching method.

FIG. 24 is a diagram illustrating a path searching method.

FIG. 25 is a diagram illustrating a path searching method.

FIG. 26 is a diagram illustrating a result of shortest path correction.

FIG. 27 is a diagram illustrating a result of interference avoidancepath correction.

DESCRIPTION OF EMBODIMENTS

Hereinafter, embodiments for implementing the present invention aredescribed with reference to the accompanying drawings. The embodimentsdescribed below are exemplary implementation of the present inventionand should be suitably modified or changed depending on configurationsand various conditions of the apparatus to which the present inventionis applied. The present invention is not limited to the followingembodiments.

First Embodiment

FIG. 1 is a diagram illustrating an exemplary configuration of a robotsystem 100 provided with a teaching device in the present embodiment.The robot system 100 includes a robot 10 and a teaching device 20. Therobot 10 is, for example, an articulated robot, and has a sensor portion11 attached to an end portion (a hand) of an arm. The sensor portion 11measures an object located near the hand of the robot 10, and outputs ameasurement result to the teaching device 20. The sensor portion 11 maybe, for example, a visual sensor or a distance sensor.

The sensor portion 11 does not necessarily have to be mounted on therobot 10, but may be, for example, mounted on another operating machine,or fixed at a position above a predetermined a space to be photographed.The robot 10 includes a position and attitude changing mechanism 12capable of changing the position and attitude of the hand of the robot10. The position and attitude changing mechanism 12 changes the positionand posture of the hand of the robot 10 by changing an angle of eachjoint of the robot 10. The position and attitude changing mechanism 12may be driven by an electric motor, or may be driven by an actuatoroperated by fluid pressure, such as oil pressure and air pressure. Theposition and attitude changing mechanism 12 is driven in accordance withteaching data indicating a moving path and the like of the robot 10generated by the teaching device 20.

An end effector 13 is attached to the hand of the robot 10. The endeffector 13 is a tool to carry out operations in accordance with typesof works of the robot 10 and is, for example, a robot hand. The robothand may be, for example, a hand having a motor-driving chuck mechanismcapable of grasping an object, or a hand employing an adsorption padwhich adsorbs an object with air pressure. The end effector 13 isdetachably attached to the arm, and is replaceable depending on the typeof the work. The robot 10 is not limited to an articulated robot, butmay be a numerically controllable (NC) movable machine.

The teaching device 20 generates teaching data for the robot (e.g., amoving path of the robot) in a virtual space, and conducts an off-lineteaching (off-line teaching) to supply the real robot with the generatedteaching data. Specifically, the teaching device 20 executes a previousanalysis process in which 3D models of a virtual robot, a tool attachedto the virtual robot (the end effector), a work which is a work object,peripheral structures, and the like, are disposed in the virtual spaceto construct a virtual robot system, and teaching data is generated bythe virtual robot system. The teaching device 20 executes a pathcorrection process to correct the teaching data generated in theprevious analysis process in accordance with the geometry of the 3Dmodel of the component acquired after the construction of the real robotsystem.

Hereinafter, each part of the teaching device 20 is described in detail.The teaching device 20 is, for example, configured by a personalcomputer (PC) and, as illustrated in FIG. 1, includes a systemconstruction unit 201, a robot path generation unit 202, an operationconfirmation unit 203, a measurement and model generation unit 204, ageometric difference determination unit 205, a path correction unit 206,an external I/F unit 207, and an I/O control unit 208. The systemconstruction unit 201 constructs a virtual robot system in a virtualspace. The robot path generation unit 202 is a virtual robot systemconstructed by the system construction unit 201, and generates a movingpath of the robot as teaching data. The operation confirmation unit 203conducts simulation of the robot path generated by the robot pathgeneration unit 202 by animation.

The measurement and model generation unit 204 measures informationindicating the geometry of the component of the real robot system bycontrolling the sensor portion 11, and generates a 3D model (a measured3D model) of the measured component. The geometric differencedetermination unit 205 determines whether a geometric difference existsbetween the measured 3D model generated by the measurement and modelgeneration unit 204 and an existing 3D model (a virtual 3D model) whichexists in the virtual space corresponding to the measured 3D model, andacquires information about a geometric error of the existing 3D model.If it is determined that the difference exists, the geometric differencedetermination unit 205 determines whether the difference may affect therobot path generated in the previous analysis process, i.e., whether therobot path generated in the previous analysis process needs to becorrected.

The path correction unit 206 corrects the robot path generated in theprevious analysis process in accordance with the determination result ofthe geometric difference determination unit 205. If it is determinedthat the geometric difference may affect the robot path (i.e., the robotpath needs to be corrected), the geometric difference determination unit205 corrects the robot path. The external I/F unit 207 transmitsteaching data generated by the robot path generation unit 202 and thepath correction unit 206 to the robot 10. The external I/F unit 207receives the measurement result of the sensor portion 11, and transmitsthe received measurement result to the measurement and model generationunit 204. The I/O control unit 208 is a device in which a user inputsoperations performed via a monitor using pointing devices, such as akeyboard and a mouse, or simulation results are displayed on themonitor.

Hardware Configuration of Off-line Teaching Device 20

FIG. 2 illustrates an exemplary hardware configuration of the teachingdevice 20. The teaching device 20 includes a CPU 21, ROM 22, RAM 23,external memory 24, an input unit 25, a display unit 26, a communicationI/F 27, and a system bus 28. The CPU 21 controls operations in theteaching device 20 collectively, and controls each of the constructionunits (22 to 27) via the system bus 28. The ROM 22 is non-volatilememory in which control programs and the like that the CPU 21 requiresto execute processes are stored. The programs may be stored in theexternal memory 24 or a removable storage medium (not illustrated). TheRAM 23 functions as main memory, a work area, or the like of the CPU 21.The CPU 21 loads necessary programs or the like from the ROM 22 to theRAM 23 for the execution of processes, and executes the programs and thelike to implement various kinds of functional operations.

The external memory 24 stores various types of data, various types ofinformation, and the like that the CPU 21 requires to perform processesusing the programs. Various types of data, various types of information,and the like obtained when the CPU 21 performs the processes using theprograms are also stored in the external memory 24. The input unit 25 isconstituted by a keyboard, a mouse, and the like. An operator is capableof providing instructions to the teaching device 20 via the input unit25. The display unit 26 is formed by a monitor of, for example, liquidcrystal display (LCD). The communication I/F 27 is an interface forcommunicating with an external device. The system bus 28 connects theCPU 21, the ROM 22, the RAM 23, the external memory 24, the input unit25, the display unit 26, and the communication I/F 27 to communicatewith one another.

The function of each part of the teaching device 20 is implemented whenthe CPU 21 executes the program stored in the ROM 22 or in the externalmemory 24. The processes executed by the teaching device 20 aredescribed in detail below.

Previous Analysis Process

FIG. 3 is a flowchart illustrating the previous analysis procedureexecuted by the teaching device 20. The previous analysis process is aprocess for conducting previous analysis by simulation in the virtualspace before constructing the real robot system. In step S1, theteaching device 20 constructs the virtual robot system in the virtualspace. The system construction unit 201 constructs the virtual robotsystem. The system construction unit 201 imports a 3D model of eachcomponent of the robot system and disposes the 3D model in the virtualspace to construct the virtual robot system. As illustrated in FIG. 4,regarding a structure in which the 3D model is prepared in an externalCAD device 210, the 3D model is imported from the CAD device 210, andregarding a structure in which the 3D model is not prepared in the CADdevice 210, a user imports a simple 3D model generated on a screen viathe I/O control unit 208. The CAD device 210 may be mounted on theteaching device 20.

When importing the 3D model, the system construction unit 201 stores thescreen configuration element data 211 in memory and the like. The screenconfiguration element data 211 is constituted by the fields illustratedin FIG. 5. Namely, a name 211 a of the 3D model, coordinates 211 b atwhich the 3D model is disposed, information 211 c about the geometry ofthe 3D model, a CAD 211 d of a reference destination of the 3D model,and a geometric correction implementation flag 211 e are correlated toeach of the components.

If no 3D model exists in the CAD device 210 and the 3D model generatedby the user is imported, nothing is described in the field of the CAD211 d of the reference destination. The geometric correctionimplementation flag 211 e is a flag indicating whether it is possiblethat a geometric difference has occurred between the virtual system andthe real system, and is equivalent to attribution information indicatingreliability of the model geometry. In the field of the geometriccorrection implementation flag 211 e, for example, a flag is describedindicating that no 3D model exists in the CAD device 210 and that it ispossible that a geometric difference has occurred between the structureof the simple geometric model generated and imported by the user and thereal robot system. The geometric correction implementation flag 211 e isused to determine whether path correction is necessary in alater-described path correction process. Returning to FIG. 3, afterconstructing the virtual robot system in step S1, the teaching device 20generates teaching points of the robot and a moving path of the robotobtained by linear interpolation of these teaching points in step S2.The teaching points and the robot path are generated so that workinghour becomes shorter and so that the robot path does not interfere withperipheral equipment.

Next, in step S3, a simulation is conducted in the virtual space basedon the teaching points and the path generated in step S2. FIG. 6illustrates an exemplary obtained robot path obtained by a simulationresult. Points 401 are teaching points. A robot path 402 is a lineconnecting the teaching points in the order of a, b, c, d, e, and f. Inthis manner, the teaching points 401 and the robot path 402 aregenerated so as not to interfere with peripheral equipment 301. In FIG.3, the process of step S1 is executed by the system construction unit201 as described above, the process of step S2 is executed by the robotpath generation unit 202, and the process of step S3 is executed by theoperation confirmation unit 203.

Path Correction Process

Next, the path correction process executed by the teaching device 20 isdescribed in detail. FIG. 7 is a flowchart illustrating a procedure ofthe path correction process. The path correction process is a processfor correcting the robot path generated in the previous analysis processdescribed above as needed, and is executed after the previous analysisprocess is executed and the real robot system is constructed. In stepS11, the teaching device 20 measures components of the real robot systemat the sensor portion 11. The components to be measured are determinedbased on the screen configuration element data 211 generated during theconstruction of the virtual robot system.

First, the teaching device 20 refers to the field of the geometriccorrection implementation flag 211 e of the screen configuration elementdata 211 illustrated in FIG. 5 and discriminates a component at which ageometric difference with the real robot system may occur. Next, theteaching device 20 refers to the field of the arrangement 211 b of thescreen configuration element data 211 illustrated in FIG. 5, andacquires a position in the virtual space of the component at which thegeometric difference may occur. In this manner, the component to bemeasured with the sensor by the real robot system is determined.

If the component is measured by the sensor portion 11, the component tobe measured is measured from a plurality of directions to an extent thata 3D model may be generated. The direction to measure is determinedbased, for example, on the field information of the geometry 211 c ofthe component as illustrated in FIG. 8 from any one of the X direction(i.e., the width direction of the structure 310), the Y direction (thedepth direction of the structure 310), and the Z direction (the heightdirection of the structure 310). When the component to be measured isthus determined, the teaching device 20 outputs a measurementinstruction to the sensor portion 11 via the external I/F unit 207, andacquires a measurement result of the sensor portion 11. The teachingdevice 20 generates a 3D model (a measured 3D model) of the componentbased on the acquired measurement result, and proceeds the process tostep S12.

In step S12, the teaching device 20 compares the measured 3D modelgenerated in step S11 with an existing 3D model in the virtual spacecorresponding to the measured 3D model. If the existing 3D model is asimple geometric model having the same outer dimension as that of theactual component like a 3D model 301 illustrated in FIG. 9A, there is acase where the measured 3D model is substantially the same in outerdimension as the existing 3D model 301 but different in shape with theexisting 3D model 301 (like 3D models 311 to 313 illustrated in FIGS. 9Bto 9D, respectively). Then, as illustrated, for example, in FIGS. 10Aand 10B, the existing 3D model 301 and the measured 3D model 311 areillustrated in voxels and compared in shape. A geometric differencebetween the existing 3D model 301 and the measured 3D model 311 isconfirmed by, for example, extracting the Fourier spectrum of the shapeillustrated in voxels.

Next, in step S13, the teaching device 20 determines whether thegeometric difference may affect the robot path generated in the previousanalysis process based on the information about the component determinedto have the geometric difference in step S12. Here, if the robot pathgenerated in the previous analysis process is correctable to theshortest path with a shorter working hour due to the geometricdifference, it is determined that the geometric difference affects therobot path. Since an interference occurs between the robot pathgenerated in the previous analysis process and the real component, it isdetermined that the geometric difference may affect the robot path alsowhen the robot path needs to be corrected to a path to avoid theinterference.

First, a method for determining whether correction to the shortest pathis possible is described. As illustrated in FIG. 11, the robot 10 andthe 3D model 310 of the real structure are seen from both sides in the Xdirection. The size of the existing 3D model in the height direction(the Z direction) on the surface facing the robot 10, the size of themeasured 3D model in the height direction (the Z direction) on thesurface facing the robot 10, and the sizes of the end effector 13 of therobot 10 in the height direction (the Z direction) and in the depthdirection (the Y direction) are focused on. For example, if the measured3D model is the 3D model 311 illustrated in FIG. 9B, as illustrated inFIG. 12, the size H1 is focused on regarding the existing 3D model 301.The sizes H2 and H3 are focused on regarding the measured 3D model 311.

If the measured 3D model is the 3D model 312 illustrated in FIG. 9C, asillustrated in FIG. 13, the size H1 is focused on regarding the existing3D model 301 in the same manner as in FIG. 12. The size H4 is focused onregarding the measured 3D model 312. Similarly, if the measured 3D modelis the 3D model 313 illustrated in FIG. 9D, as illustrated in FIG. 14,the size H1 is focused on regarding the existing 3D model 301. The sizeH5 (=H1) is focused on regarding the measured 3D model 313.

Then, based on the sizes focused on described above, it is determinedwhether the geometric difference between the existing 3D model and themeasured 3D model may affect the robot path generated in the previousanalysis process. In the present embodiment, in a case where the endeffector 13 of the robot 10 has the height H, the width W, and the depthD as illustrated in FIG. 15, if the value obtained by subtracting thesum total of the size of the measured 3D model in the height directionon the surface facing the robot 10 from the size of the existing 3Dmodel in the height direction on the surface facing the robot 10 isgreater than the height H or the width W of the end effector 13, it isdetermined that the geometric difference may affect the robot path. Inan example illustrated in FIG. 12, when H1−(H2+H3)>H or H1−(H2+H3)>D, asillustrated in FIG. 16, it is possible that the end effector 13 of therobot 10 passes through a hollowed portion which is the differenceportion with the existing 3D model 301. Therefore, it is determined thatthe shortest path may be found newly and, in this case, it is determinedthat the existing robot path may be affected.

In the case of example illustrated, for example in FIG. 13, when H1−H4>Hor H1−H4>D, as illustrated in FIG. 17, it is possible that the endeffector 13 of the robot 10 passes through a hollowed portion which isthe difference portion with the existing 3D model 301. Also in thiscase, it is determined that the existing robot path may be affected(correction to the shortest path is possible). On the contrary, in theexample illustrated in FIG. 14 in which H1−H5=0 and the conditiondescribed above is not satisfied, it is determined that the existingrobot path is not affected (correction to the shortest path isimpossible). Whether correction to the shortest path is possible canthus be determined. This determination is made regarding both sides inthe X direction of FIG. 11.

Next, a method for determining whether correction to the interferenceavoidance path is necessary is described. FIG. 18 is a diagramillustrating an exemplary robot path generated in the previous analysisprocess. This robot path 403 is a path along which the robot 10 passesnear the existing 3D model 301 in the order of the teaching points of a,b, c, d, e, and f in the virtual space. Whether correction to theinterference avoidance path is necessary is determined based on thepositional relationship between the existing robot path 403 and themeasured 3D model 314 after displacing the existing 3D model 301 in FIG.18 with the measured 3D model 314 as illustrated in FIG. 19.

In the example illustrated in FIG. 19, it turns out that an interferenceoccurs on the path passing through the teaching points b, c, and d dueto the geometric difference. That is, the path passing through theteaching points b, c, and d is a path requiring correction to theinterference avoidance path. Whether correction to the interferenceavoidance path is possible can thus be determined. If it is determinedthat the geometric difference may affect the existing robot path instepS13 of FIG. 7, the teaching device 20 determines to correct the robotpath and proceeds the process to step S14. If it is determined that theexisting robot path is not affected, the teaching device 20 determinesnot to correct the robot path and proceeds the process tolater-described step S16. In step S14, the teaching device 20 correctsthe robot path. Here, the teaching device 20 partially corrects therobot path generated in the previous analysis process at the portionrequiring the correction.

First, a method for correcting to the shortest path is described. FIG.20 is a diagram illustrating an exemplary robot path generated in theprevious analysis process. The robot path 403 is a path along which therobot 10 passes near the existing 3D model 301 in the order of theteaching points a, b, c, d, e, and f in the virtual space. The robotpath 404 is a path along which the robot 10 passes near the existing 3Dmodel 301 in the order of the teaching points x, y, and z in the virtualspace. When searching for the shortest path, as illustrated in FIG. 21,the existing 3D model 301 in FIG. 20 is first replaced with the measured3D model 311.

Next, a vicinity area 501 located at a certain distance from themeasured 3D model 311 is set, and the teaching points located in thevicinity area 501 are searched. In the example illustrated in FIG. 21,the teaching point b, c, d, e, and y are located in the vicinity area501. Although the vicinity area 501 is a rectangular parallelepipedspace herein, it is only necessary that the vicinity area 501 defines aregion near the measured 3D model, and may be, for example, spherical inshape. Further, a path toward the teaching points in the vicinity area501 (i.e., a path entering the vicinity area 501 from the outside of thevicinity area 501) is searched from the outside of the vicinity area501. In the example illustrated in FIG. 21, a path 411 of a to b and apath 412 of x to y are searched. Similarly, a path toward outside thevicinity area 501 from the inside of the vicinity area 501 is searched.In the example illustrated in FIG. 21, a path 413 of e to f and a path414 of y to z are searched.

Next, teaching points of which end point of the path entering thevicinity area 501 from the outside of the vicinity area 501 (the path411 and the path 412 in FIG. 21) and the start point of the path movingout of the vicinity area 501 from the vicinity area 501 (the path 413and the path 414 in FIG. 21) are not the same coordinates are searched.In example illustrated in FIG. 21, the teaching point b and the teachingpoint e are searched. In FIG. 21, regarding the path in the order of theteaching points x, y, and z, the teaching point y has both the functionsof the start point and the end point, and it can be determined that theend effector 13 enters the vicinity area 501 just for a moment and ithas no relationship with the end effector passing through the hollowedportion of the 3D model 311. Therefore, it turns out that it is onlynecessary to search the shortest path with the teaching point b as thestart point and with the teaching point e as the end point.

A search tree method may be used, for example, for the shortest pathsearch. FIG. 22 is a diagram illustrating a method for searching a pathby graph searching. A case where the shortest path from a start point601 to a target point 602 in a space 600 is to be searched asillustrated in FIG. 22 is considered. Here, obstacles, i.e.,non-transmitting areas 603 exist in the space 600. Although a 2D spaceis illustrated in FIG. 22, the present embodiment is applicable also toa 3D space.

First, the space 600 is rendered as mesh (grid) structures asillustrated in FIG. 22. Next, as illustrated in FIG. 23, moving from thestart point 601 to an adjoining grid and moving from the target point602 to an adjoining grid are considered. If the obstacles 603 exist inthe adjoining grids, the points do not move to those grids. For example,regarding the start point 601 in FIG. 23, since the obstacle 603 existsin the directions of C and D among the eight directions of A to H, thestart point 601 does not move to the directions of C and D. Regardingthe target point 602, since no obstacle 603 exists in any adjoininggrids, the target point 602 can move to any directions of A to H.

Similarly, as illustrated in FIG. 24, the path moves to adjoining gridsin which no obstacle exists (e.g., grids 604 and 605) from the grid towhich they have moved. This process repeated at both the start point 601and the target point 602, and the path along which the points from thestart point 601 and the target point 602 enter the same grid mostpromptly is the shortest path. In this example, the path 610 is theshortest path as illustrated in FIG. 25. The shortest path searched inthe method described above with the teaching point b in FIG. 21 as thestart point and teaching point e in FIG. 21 as the end point is the path415 in FIG. 26. The existing robot path can thus be corrected to theshortest path.

Since the method described above is used for the path search algorithm,if the vicinity area 501 is set large, the path correction in the longdistance becomes possible and the corrected path can be smoothed. Inthis case, however, it is easily estimated that the process time becomeslong. Therefore, the vicinity area 501 may be set depending on whetherpriority is given to processing time or priority is given to smoothnessof the path. Although the case where the shortest path is searched bygraph searching has been described above, other algorithms (e.g.,sampling base searching, such as RRT and PRM) may also be used.

Next, a method for correcting to the interference avoidance path isdescribed. First, the start point and the end point of the interferenceavoidance path are searched. In the example illustrated in FIG. 19described above, the path passing through the teaching points b, c, andd is a path requiring correction to the interference avoidance path.Therefore, in this case, the interference avoidance path is searchedwith the teaching point b as the start point and the teaching point d asthe end point. Search of the interference avoidance path is conducted inthe same manner as the search of the shortest path described above. Inthis manner, as illustrated in FIG. 27, a corrected path 416 of whichteaching point b is the start point and teaching point d is the targetpoint, and of which interference with the measured 3D model 314 has beenavoided is obtained. The corrected path 416 passes through, for example,the teaching points g and h newly set in the path search. As describedabove, after the path is corrected to pass the shortest path or to avoidan interference, the teaching device 20 proceeds the process to step S15of FIG. 7 and updates the virtual robot system. That is, the teachingdevice 20 replaces the 3D model in the virtual space with the measured3D model and updates the robot system in the virtual space.

Next, in step S16, the teaching device 20 transmits the corrected robotpath data to the real robot system. Operation confirmation by the realrobot system is thus conducted. As described above, in the presentembodiment, the moving path of the robot taught by the virtual robotsystem in the virtual space for the previous analysis is correcteddepending on the geometric error of the virtual 3D model whichconfigures the virtual robot system. In a case where a geometricdifference in the structure of the robot system exists between thevirtual robot system and the real robot system, when the robot is madeto operate on the operation program generated on the virtual robotsystem, an interference between the robot and the peripheral equipmentmay occur in the real robot system, or a desired working hour may beunable to be achieved.

Therefore, in a related art off-line teaching device, a generatedoperation program is transmitted to the real robot system, adjustment isconducted in the real robot system, and the operation program iscorrected. If the operation program corrected in the real robot systemis returned to the teaching device, an interference or the like mayoccur between the robot and the peripheral equipment in a simulation onthe teaching device. Therefore, the robot system in the virtual space isreconstructed to be the same as the real robot system and re-teachingoperation is conducted.

On the contrary, in the present embodiment, if a geometric error of thevirtual 3D model has occurred, the operation program generated on thevirtual robot system is corrected automatically and then transmitted tothe real robot system. Therefore, on-site adjustment or re-teachingoperation using the real robot system are unnecessary. Thus, appropriateoff-line teaching is achieved even if a geometric difference instructure has occurred between the system in the virtual space and thereal robot system. Whether the geometric difference of the 3D model mayaffect the robot path generated in the previous analysis process, i.e.,whether correction of that robot path is necessary is determined and, ifit is determined that correction is necessary, the robot path iscorrected. Therefore, the correction process may be executedefficiently.

Whether a geometric error of the virtual 3D model has occurred isdetermined by measuring the shape of the structure of the real robotsystem using a visual sensor, a distance sensor, and the like.Specifically, a measured 3D model of the structure is generated inaccordance with the measurement result of the sensor, the generatedmeasured 3D model and the virtual 3D model are compared, and a geometricerror of the virtual 3D model is calculated. Since the geometricdifference is determined in accordance with the measurement result,existence of the geometric difference in the structure of the robotsystem between the virtual robot system and the real robot system can beknown reliably.

The geometric measurement by the sensor is conducted only about thestructure on the real robot system corresponding to the virtual 3D modelin which it is determined that a geometric error may exist. Here,whether a geometric error may exist is determined depending on whether,for example, the virtual 3D model is a simple geometric model generatedby the user. The 3D data prepared by a manufacturer of the robot may beused for the robot, whereas no 3D model is prepared, though 2D drawingsexist, for the peripheral equipment in many cases since the number ofparts, such as tools, is large. Especially, since the peripheralequipment is supplied at a production site, newly generating a 3D modelis a significantly time-consuming work to an operator in the productionsite who does not design using a 3D CAD device. Therefore, regarding theperipheral equipment, a simple geometric model having a substantiallythe same outer dimension as that of the 3D model is generated and usedas a substitution in many cases. Therefore, various types of datadifferent in reliability of model geometry exist in the virtual 3D modelconstituting the virtual robot system.

In the present embodiment, when constructing the virtual robot system,attribution information (the geometric correction implementation flag211 e) indicating whether the model is data with high reliabilityprepared by a manufacturer and the like or the model is data with lowreliability generated simply by the user is added to each virtual 3Dmodel. With reference to the attribution information, the virtual 3Dmodel in which a geometric error may exist is discriminated. Therefore,a structure requiring geometric measurement using the sensor can bediscriminated relatively easily and appropriately.

In the comparison between the measured 3D model and the virtual 3Dmodel, these 3D models are expressed by voxel data and a geometricdifference therebetween is determined. Therefore, geometric comparisoncan be conducted appropriately. Whether the geometric difference of the3D model may affect the robot path generated in the previous analysisprocess, i.e., whether that robot path needs to be corrected, isdetermined depending on whether the robot path is correctable to theshortest moving path, or whether the robot path is a path along which aninterference may occur.

In the previous analysis process, off-line teaching is conducted so thatno interference between the robot and the peripheral equipment occurs onthe virtual robot system and the working hour becomes the shortest, andthe operation program is generated. If, however, there is a geometricdifference between the virtual 3D model and the real structure, theshortest path to the working point may be changed (i.e., the shorterpath may be found). In the present embodiment, if it is determined thatthe robot path is correctable to the shortest moving path due to thegeometric difference of the 3D model, that robot path is correctable tothe shortest moving path. Therefore, the shortest path to the workingpoint can be taught appropriately, and further shortening of the workinghour can be achieved.

At this time, whether the robot path is correctable to the shortestmoving path is determined depending on the geometry of the virtual 3Dmodel, the geometry of the measured 3D model, and the geometry of the 3Dmodel of the end effector of the robot. Specifically, when the lengthobtained by subtracting the length of a side of the measured 3D model inthe height direction on the surface facing the robot from the length ofa side of the virtual 3D model in the height direction on the surfacefacing the robot is longer than the length corresponding to the 3D modelof the end effector in the height direction, it is determined that therobot path is correctable to the shortest moving path. Therefore, if thestructure of the real robot system has a hollowed portion and itsmagnitude is large enough for the end effector to pass through, it isdetermined that the path along which the end effector passes through thehollowed portion is the shortest moving path, and the robot path can becorrected.

Further, in the present embodiment, if it is determined that the robotpath is the path along which an interference may occur in the real robotsystem due to the geometric difference of the 3D model, that robot pathis correctable to an interference avoidance path. Therefore, adjustmentafter transmitting the operation program to the real robot systembecomes unnecessary. At this time, it is determined whether the robotpath is a path along which an interference may occur depending on thegeometry of the measured 3D model, and the robot path. As describedabove, whether an interference may occur can be determined easily fromthe positional relationship between the measured 3D model and the robotpath. If the path is corrected to the shortest moving path or theinterference avoidance path, the moving path which needs to be correctednear the virtual 3D model is corrected partially of the robot pathgenerated in the previous analysis process. Therefore, correctionprocess time can be shortened.

If the path is corrected to the shortest moving path, the virtual 3Dmodel is replaced by the measured 3D model, and a vicinity area locatedat a predetermined distance from the measured 3D model is set in thevirtual space. Then a start point and an end point of a moving path tobe partially corrected are selected from the teaching points which existin the vicinity area, and the shortest moving path connecting theselected teaching points is searched. The teaching point which becomesan end point of the moving path moving from a teaching point outside ofthe vicinity area to the teaching point inside of the vicinity area isselected as a start point, and the teaching point which becomes a startpoint of the moving path moving from a teaching point inside of thevicinity area to the teaching point outside of the vicinity area isselected as an end point. Since the start point and the end point of themoving path to be partially corrected are thus selected and path searchis conducted, a path along which the end effector passes through thehollowed portion of the 3D model can be searched. Therefore, a path tomove to the working point at the shortest than the robot path generatedin the previous analysis process can be searched.

If the path is corrected to the interference avoidance path, theteaching point as the start point and the teaching point as the endpoint of the moving path along which an interference has occurred areselected as the start point and the end point of the moving path to bepartially corrected, respectively, an interference avoidance pathconnecting the selected teaching points is searched. Therefore, therobot path along which no interference occurs can be taughtappropriately in the real robot system. As described above, the robotpath taught with the robot system model constructed using the 3D modelof the component in the virtual space for the previous analysis can becorrected automatically as necessary depending on the geometry of the 3Dmodel of the component measured after the construction of the real robotsystem so that the robot passes the shortest path or the robot passesthe path avoiding an interference. Therefore, even if a geometricdifference occurs between a structure of a virtual robot system and astructure of a real robot system, appropriate off-line teaching data canbe generated, and labor and time for re-instruction can be saved.

Modification

The geometry of the periphery structure of the robot 10 is measuredusing the sensor portion 11 in the embodiment described above, but thegeometry of the end effector 13 of the robot 10 may be measured usingthe sensor portion 11. In this case, measured values can be used as thevalues of the height H or the width W of the end effector 13 used forthe determination as to whether a geometric difference between theexisting 3D model and the measured 3D model may affect the robot pathgenerated in the previous analysis process. Therefore, more highlyprecise determination can be conducted.

In the embodiment described above, the geometry of the structure on thereal robot system is measured using the sensor portion 11, and adifference in model geometry is confirmed by comparing the measured 3Dmodel generated in accordance with the measurement result with theexisting 3D model, but this is not restrictive. For example, informationabout a geometric error of the existing 3D model (a geometric differencewith a corresponding structure of a real robot system) may be directlyinput from outside by, for example, a user. In this case, processes ofsteps S11 and S12 of FIG. 7 become unnecessary.

Other Embodiments

The present invention is applicable also to a process in which a programthat performs one or more functions of the above-described embodimentsis supplied to a system or an apparatus via a network or a storagemedium, and one or more processors in a computer of the system or theapparatus read and execute the program. Further, the present inventionis implementable in a circuit having one or more functions (e.g., ASIC).

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc(BD)TM), a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

1. A teaching data creation device, comprising: an acquisition unitconfigured to acquire a measured three-dimensional (3D) model thatrepresents a geometry of a peripheral structure of a real robot; and acorrection unit configured to correct teaching data in a case where amoving path of the robot according to the teaching data indicating themoving path of the robot is able to be made shorter or in a case wherean interference with the peripheral structure occurs due to movement ofthe robot according to the teaching data in the acquired 3D model. 2.The teaching data creation device according to claim 1, wherein theacquisition unit is a visual sensor or a distance sensor.
 3. Theteaching data creation device according to claim 1, further comprising:a creation unit configured to create the teaching data by constructing,in a virtual space, a virtual robot system in which a virtual 3D modelof the robot and a virtual 3D model of the peripheral structure of therobot are arranged.
 4. The teaching data creation device according toclaim 1, wherein the virtual 3D model is a 3D model to which attributioninformation indicating reliability of a model geometry is added, andwherein the acquisition unit acquires the measured 3D model based on theattribution information added to the virtual 3D model.
 5. The teachingdata creation device according to claim 1, wherein the correction unitpartially corrects the moving path of the robot according to theteaching data.
 6. The teaching data creation device according to claim1, further comprising: a transfer unit configured to transfer thecorrected teaching data to a robot system.
 7. A robot system,comprising: a robot; the teaching data creation device according toclaim 1; and a control device configured to cause the robot to operatebased on the corrected teaching data.
 8. A control method forcontrolling a teaching data creation device, comprising: acquiring ameasured three-dimensional (3D) model that represents a geometry of aperipheral structure of a real robot; and correcting teaching data in acase where a moving path of the robot according to the teaching dataindicating the moving path of the robot is able to be made shorter or ina case where an interference with the peripheral structure occurs due tomovement of the robot according to the teaching data in the acquired 3Dmodel.
 9. The control method according to claim 8, wherein, in theacquiring, the measured 3D model is acquired using a visual sensor or adistance sensor.
 10. The control method according to claim 8, furthercomprising: creating the teaching data by constructing, in a virtualspace, a virtual robot system in which a virtual 3D model of the robotand a virtual 3D model of the peripheral structure of the robot arearranged.
 11. The control method according to claim 8, wherein thevirtual 3D model is a 3D model to which attribution informationindicating reliability of a model geometry is added, and wherein themeasured 3D model is acquired by performing the acquiring based on theattribution information added to the virtual 3D model.
 12. The controlmethod according to claim 8, wherein, in the correcting, the moving pathof the robot according to the teaching data is partially corrected. 13.The control method according to claim 8, further comprising:transferring the corrected teaching data to a robot system.
 14. Anon-transitory storage medium storing a program to be read and run by acomputer for execution of the control method according to claim 8.